package com.bw.service.impl;

import com.bw.domain.Role;
import com.bw.domain.TbMenu;
import com.bw.domain.User;
import com.bw.mapper.UserMapper;
import com.bw.service.UserService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author :Beyond🎸🎸
 * @date : 2025-02-28 19:02:50
 * @description Rock and Roll
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public User selectByName(String username) {
        return userMapper.selectOne(username);
    }

    @Override
    public List<Role> listRoleByUserId(Integer userId) {
        return userMapper.listRoleByUserId(userId);
    }

    @Override
    public List<User> list(User user) {
        return userMapper.list(user);
    }

    @Override
    public List<TbMenu> listMenus() {
        return userMapper.listMenus();
    }
}
